package cn.lili.modules.wallet.service;


import cn.lili.common.vo.PageVO;
import cn.lili.modules.payment.entity.dos.UserWithdrawApply;
import cn.lili.modules.payment.entity.vo.WithdrawApplyQueryVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * 会员提现申请业务层
 *
 * @author pikachu
 * @since 2020-02-25 14:10:16
 */
public interface WithdrawApplyService extends IService<UserWithdrawApply> {




    /**
     * 用户提现
     *
     * @param price 提现金额
     * @return 是否提现成功
     */
    Boolean applyWithdrawal(Double price);

    /**
     * 提现公共方法，此方法供前端用户提现和后端提现使用
     *
     * @param userWithdrawApply 会员零钱提现申请
     * @return 操作状态
     */
    Boolean withdrawal(UserWithdrawApply userWithdrawApply);



    /**
     * 平台审核提现申请，申请成功后直接扣款
     *
     * @param applyId 审核id
     * @param result  审核结构
     * @param remark  备注
     */
    void audit(String applyId, Boolean result, String remark);

    /**
     * 提现记录列表
     *
     * @param pageVO                     分页条件
     * @param withdrawApplyQueryVO 提现记录查询条件
     * @return 提现记录分页
     */
    Page<UserWithdrawApply> getWithdrawPage(PageVO pageVO, WithdrawApplyQueryVO withdrawApplyQueryVO);

}